home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / Bowers Development / AppMaker 2.1.sit / AppMaker 2.1 / Examples / TCL / Gadgets / zButtons.cp / zButtons.cp
Encoding:
Text File  |  1997-02-26  |  2.7 KB  |  101 lines  |  [TEXT/KAHL]

  1. /* zButtons.cp -- window methods */
  2. /* Created 2/25/97 10:03 PM by AppMaker */
  3.  
  4. /*    We recommend that you not modify this module and instead modify        */
  5. /*    its subclass, Buttons.  The 'z' prefix on this module marks        */
  6. /*    a module which is likely to be regenerated by AppMaker after you    */
  7. /*    make changes to the user interface.  The modules without the 'z'    */
  8. /*    prefix will not be regenerated by AppMaker unless you delete them.    */
  9. /*    Using a separate subclass to override the AppMaker-generated code    */
  10. /*    lets you regenerate code without losing your hand-coded changes.    */ 
  11.  
  12. #include <Commands.h>
  13. #include <Constants.h>
  14. #include <Global.h>
  15. #include <CBartender.h>
  16. #include <CDecorator.h>
  17. #include <CDesktop.h>
  18. #include <CDirector.h>
  19. #include <CError.h>
  20. #include <CSizeBox.h>
  21. #include <TBUtilities.h>
  22. #include <CAMButton.h>
  23. #include <CAMCheckBox.h>
  24. #include <CAMRadioControl.h>
  25. #include "CmdCodes.h"
  26. #include "GadgetsData.h"
  27. #include "zButtons.h"
  28.  
  29. #define    ButtonsID    1000        /* resource ID for WIND template */
  30.  
  31. extern    CBartender        *gBartender;    /* The menu handling object */
  32. extern    CDecorator        *gDecorator;    /* Window dressing object    */
  33. extern    CDesktop        *gDesktop;        /* The enclosure for all windows */
  34. extern    CError            *gError;        /* The error handling object */
  35.  
  36. /*----------*/
  37. void    ZButtons::IZButtons    (CDirector            *aSupervisor)
  38. {
  39.     CView            *enclosure;
  40.     CBureaucrat        *supervisor;
  41.     CSizeBox        *aSizeBox;
  42.  
  43.     IWindow (ButtonsID, FALSE, gDesktop, aSupervisor);
  44.  
  45.     enclosure = this;
  46.     supervisor = this;
  47.  
  48.  
  49.     itsOKButton = new CAMButton;
  50.     itsOKButton->IViewRes ('CtlP', 1001, enclosure, supervisor);
  51.  
  52.     itsX3DButton = new CAMButton;
  53.     itsX3DButton->IViewRes ('CtlP', 1002, enclosure, supervisor);
  54.  
  55.     itsPictButtonButton = new CAMButton;
  56.     itsPictButtonButton->IViewRes ('CtlP', 1003, enclosure, supervisor);
  57.  
  58.     itsTitledPictButton = new CAMButton;
  59.     itsTitledPictButton->IViewRes ('CtlP', 1004, enclosure, supervisor);
  60.  
  61.     itsCheckCheck = new CAMCheckBox;
  62.     itsCheckCheck->IViewRes ('CtlP', 1005, enclosure, supervisor);
  63.  
  64.     itsX3DRadioRadio = new CAMRadioControl;
  65.     itsX3DRadioRadio->IViewRes ('CtlP', 1006, enclosure, enclosure);
  66.  
  67.     itsPictCheckCheck = new CAMCheckBox;
  68.     itsPictCheckCheck->IViewRes ('CtlP', 1007, enclosure, supervisor);
  69.  
  70.     itsX3DCheckCheck = new CAMCheckBox;
  71.     itsX3DCheckCheck->IViewRes ('CtlP', 1008, enclosure, supervisor);
  72.  
  73.     itsMainPane = NULL;
  74.  
  75.     aSizeBox = new CSizeBox;
  76.     aSizeBox->ISizeBox (enclosure, supervisor);
  77.  
  78. } /* IZButtons */
  79.  
  80. /*----------*/
  81. void    ZButtons::UpdateMenus    (void)
  82. {
  83.     inherited::UpdateMenus ();
  84.  
  85.  
  86. } /* UpdateMenus */
  87.  
  88. /*----------*/
  89. void    ZButtons::DoCommand        (long        theCommand)
  90. {
  91.     switch (theCommand) {
  92.  
  93.     default:
  94.         inherited::DoCommand (theCommand);
  95.         break;
  96.     } /* switch */
  97.  
  98. } /* DoCommand */
  99.  
  100. /* zButtons.cp */
  101.